﻿'      *********    NE PAS MODIFIER CE FICHIER     *********
'      Ce fichier est régénéré par un outil de création.Modifier
' .     ce fichier peut provoquer des erreurs.
Imports System
Namespace Expression.Blend.SampleData.SamplePagesDataSource
' To significantly reduce the sample data footprint in your production application, you can set
' the DISABLE_SAMPLE_DATA conditional compilation constant and disable sample data at runtime.
#If DISABLE_SAMPLE_DATA Then
    Friend Class SamplePagesDataSource
    End Class
#Else

    Public Class SamplePagesDataSource
        Implements System.ComponentModel.INotifyPropertyChanged

        Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

        Protected Overridable Sub OnPropertyChanged(ByVal propertyName As String)
            Dim handler As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
            If handler IsNot Nothing Then
                RaiseEvent PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
            End If
        End Sub

        Public Sub New()
            MyBase.New()
            Try
                Dim resourceUri As System.Uri = New System.Uri("/OMANE.Modules.PMT;component/SampleData/SamplePagesDataSource/SamplePagesDataSource.xaml", System.UriKind.Relative)
                If System.Windows.Application.GetResourceStream(resourceUri) IsNot Nothing Then
                    System.Windows.Application.LoadComponent(Me, resourceUri)
                End If
            Catch __exception As System.Exception
            End Try
        End Sub

        Private _Collection As ItemCollection = New ItemCollection

        Public ReadOnly Property Collection() As ItemCollection
            Get
                Return Me._Collection
            End Get
        End Property
    End Class

    Public Class Item
        Implements System.ComponentModel.INotifyPropertyChanged

        Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

        Protected Overridable Sub OnPropertyChanged(ByVal propertyName As String)
            Dim handler As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
            If handler IsNot Nothing Then
                RaiseEvent PropertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
            End If
        End Sub

        Private _DisplayName As String = String.Empty

        Public Property DisplayName() As String
            Get
                Return Me._DisplayName
            End Get

            Set(ByVal value As String)
                If Not Object.Equals(Me._DisplayName, value) Then
                    Me._DisplayName = value
                    Me.OnPropertyChanged("DisplayName")
                End If
            End Set
        End Property
    End Class

    Public Class ItemCollection
        Inherits System.Collections.ObjectModel.ObservableCollection(Of Item)
    End Class
#End If
End Namespace
